
#include "ScrollBarObserver.h"
#include <eikscrlb.h>

void CScrollBarObserver::HandleScrollEventL(CEikScrollBar* aScrollBar,TEikScrollEvent aEventType)
{
    switch (aEventType)
    {   
        case EEikScrollThumbDragVert:
        {
            sbPosition = aScrollBar->ThumbPosition();
            if(iScrollBarObserver)
            {
                iScrollBarObserver->ChangeRectsCoordinates(sbPosition);
            }
            break;
        }
        case EEikScrollThumbReleaseVert:
        {
            sbPosition = aScrollBar->ThumbPosition();
            //TInt scrollBarBreadth=aScrollBar->ScrollBarBreadth();
//            if(iScrollBarObserver)
//            {
//                iScrollBarObserver->ChangeRectsCoordinates(sbPosition);
//            }
            break;
        }
        case EEikScrollPageDown:
        {
            sbPosition = aScrollBar->ThumbPosition();
            break;
        }
        case EEikScrollPageUp:
        {
            sbPosition = aScrollBar->ThumbPosition();
            break;
        }
        default:
            TInt b = 0;
            //            SetActualElement(aScrollBar->ThumbPosition());
            break;
    }
}
